This is written in Java