implemented code