add basic layer function to codebase