added similar functions for Java and DB tier