refactored enjavasms resource