Coded basic functionality using basic Javascript